package com.black.app.service.exercise;

import com.black.app.domain.exercise.AppExerciseGroup;
import com.baomidou.mybatisplus.extension.service.IService;
import com.black.app.domain.req.exercise.add.AppExerciseGroupAddReq;
import com.black.app.domain.req.exercise.edit.AppExerciseGroupEditReq;

import java.util.List;

/**
* @author L
* @description 针对表【app_exercise_group】的数据库操作Service
* @createDate 2024-10-23 16:57:08
*/
public interface AppExerciseGroupService extends IService<AppExerciseGroup> {

    /**
     * 根据系列id查询动作组
     * @param seriesId
     * @return
     */
    List<AppExerciseGroup> findBySId(Long seriesId);

    /**
     * 添加动作组
     * @param req
     * @return
     */
    boolean add(AppExerciseGroupAddReq req);

    /**
     * 修改动作组
     * @param req
     * @return
     */
    boolean edit(AppExerciseGroupEditReq req);

    /**
     * 根据id查询动作组
     * @param groupId
     * @return
     */
    AppExerciseGroup findById(Long groupId);

    /**
     * 根据系列id和动作组id查询动作组
     * @param sid
     * @param gid
     * @return
     */
    AppExerciseGroup findBySidAndGid(Long sid, Long gid);

    /**
     * 批量删除动作组
     * @param groupId
     * @return
     */
    boolean deleteById(Long groupId);
}
